package org.example.day;

/**
 * @Description: TODO
 * @Author wyatt
 * @Data 2024/08/19 19:48
 */
@Deprecated
public class Solution552 {

    public static void main(String[] args) {
        for (int i = 1; i < 10; i++) {
            System.out.println(new Solution552().checkRecord(i));
        }

        System.out.println(new Solution552().checkRecord(10101)) ;
    }
    public int checkRecord(int n) {
        return (int) (Math.pow(2, n) - Math.max(n-2, 0) % 1000000007 + (Math.pow(2, n-1) - Math.max(n-3, 0)) * n) % 1000000007;
    }
}
